/**
   message.h - Created by Timothy Morey on 8/12/2011.

*/

#ifndef __MESSAGE_H
#define __MESSAGE_H

#include <string>
#include <boost/shared_ptr.hpp>

class Message
{
public:
  Message(const std::string& msg)
    : _Message(msg), _Data(0), _Handled(false)
  {
  }

  Message(const std::string& msg, void* data)
    : _Message(msg), _Data(data), _Handled(false)
  {
  }

public:
  const std::string& GetMessage() const { return _Message; }
  void* GetData() const { return _Data; }
  bool IsHandled() const { return _Handled; }

public:
  void MarkAsHandled() { _Handled = true; }

protected:
  std::string _Message;
  void* _Data;
  bool _Handled;
};

typedef boost::shared_ptr<Message> MessagePtr;

#endif
